package pers.corvey.studyjava.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import pers.corvey.studyjava.util.ToStringUtils;

@Entity
@Table(name="question_answer")
public class QuestionAnswer {
    
    private String id;
    private String questionId;
    private String choiceId;
    
    public QuestionAnswer() {}
    
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Column(name="question_id")
    public String getQuestionId() {
        return questionId;
    }

    public void setQuestionId(String questionId) {
        this.questionId = questionId;
    }

    @Column(name="choice_id")
    public String getChoiceId() {
        return choiceId;
    }

    public void setChoiceId(String choiceId) {
        this.choiceId = choiceId;
    }

    @Override
    public String toString() {
        return ToStringUtils.objectToString(this);
    }
}
